import numpy.random as npr
import matplotlib.pyplot as plt
import pandas as pd
import datetime as dt

def test1():
    min=10
    max=20
    s=npr.rand(3,2)*(max-min)+min
    print(s)
def test2():
    data=pd.read_csv('data.csv',index_col='Date')
    data.index=[dt.datetime.strftime(x,'%Y-%m-%d')for x in data.index]
    s2=data.head()
    data.plot(figsize=(10,6))
    plt.ylabel('涨跌幅')
    print(s2)
test2()
